home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1995 November / SHOWCASE.ISO / files / shared.dir / 05282_Script_Shared Movie Scripts < prev    next >
Text File  |  1995-06-14  |  7KB  |  220 lines

  1. --òò-- Shared Movie Script --òò--
  2. global demoQTstate, cDemoQT
  3.  
  4. -- this routine is used to control the audio and is called with two possible arguments:
  5. -- #up or #down (actually only #up is used)
  6. --
  7. on volumeLevel changeType
  8.   global whichSprite, cAudioLevel, gSoundlevel
  9.   put the clickOn into whichSprite
  10.   puppetSprite whichSprite, TRUE
  11.   set the castnum of sprite whichSprite = ¼
  12.     the number of cast  (the name of cast(the castnum of sprite whichSprite) && "lit")
  13.   puppetSprite cAudioLevel, TRUE
  14.   -- do we increase or decrease the volume?
  15.   if changeType = #up then
  16.     if gSoundlevel < 6 then
  17.       set gSoundlevel = gSoundlevel + 1
  18.     end if
  19.   else
  20.     if gSoundlevel > 1 then
  21.       set gSoundlevel = gSoundlevel - 1
  22.     end if
  23.   end if
  24.   set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
  25.   puppetSound "click"
  26.   updatestage
  27.   repeat while the stillDown
  28.     -- do we increase or decrease the volume?
  29.     if changeType = #up then
  30.       if gSoundlevel < 6 then
  31.         set gSoundlevel = gSoundlevel + 1
  32.       end if
  33.     else
  34.       if gSoundlevel > 0 then
  35.         set gSoundlevel = gSoundlevel - 1
  36.       end if
  37.     end if
  38.     set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
  39.     updateStage
  40.     waitFor .1 -- delay so the volume changes at a reasonable pace
  41.   end repeat
  42.   puppetSprite whichSprite, FALSE
  43.   set the soundlevel = gSoundlevel
  44. end volumeLevel
  45.  
  46.  
  47. on volumeLevelUp
  48.   global whichSprite, cAudioLevel, gSoundlevel
  49.   put the clickOn into whichSprite
  50.   puppetSprite whichSprite, TRUE
  51.   set the castnum of sprite whichSprite = the number of cast  "Volume up lit"
  52.   puppetSprite cAudioLevel, TRUE
  53.   if gSoundlevel < 6 then
  54.     set gSoundlevel = gSoundlevel + 1
  55.   end if
  56.   set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
  57.   puppetSprite whichSprite, FALSE
  58.   set the soundlevel = gSoundlevel
  59.   updateStage
  60.   --  if the machineType <> 256 then puppetSound "click"
  61. end volumeLevelUp
  62.  
  63.  
  64. on volumeLevelDown
  65.   global whichSprite, cAudioLevel, gSoundlevel
  66.   put the clickOn into whichSprite
  67.   puppetSprite whichSprite, TRUE
  68.   set the castnum of sprite whichSprite = the number of cast  "Volume down lit"
  69.   puppetSprite cAudioLevel, TRUE
  70.   if gSoundlevel > 0 then
  71.     set gSoundlevel = gSoundlevel - 1
  72.   end if
  73.   set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
  74.   puppetSprite whichSprite, FALSE
  75.   set the soundlevel = gSoundlevel
  76.   updateStage
  77.   --  if the machineType <> 256 then puppetSound "click"
  78. end volumeLevelDown
  79.  
  80. on volumeLevelUpQT QTSprite
  81.   global whichSprite, cAudioLevel, gSoundlevel
  82.   put the clickOn into whichSprite
  83.   puppetSprite whichSprite, TRUE
  84.   set the castnum of sprite whichSprite = the number of cast  "Volume up lit"
  85.   puppetSprite cAudioLevel, TRUE
  86.   if gSoundlevel < 6 then
  87.     set gSoundlevel = gSoundlevel + 1
  88.   end if
  89.   set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
  90.   puppetSprite whichSprite, FALSE
  91.   set the soundlevel = gSoundlevel
  92.   set the volume of sprite QTSprite = (gSoundlevel*32) + 32
  93.   updateStage
  94.   --  if the machineType <> 256 then puppetSound "click"
  95. end volumeLevelUp
  96.  
  97.  
  98. on volumeLevelDownQT QTSprite
  99.   global whichSprite, cAudioLevel, gSoundlevel
  100.   put the clickOn into whichSprite
  101.   puppetSprite whichSprite, TRUE
  102.   set the castnum of sprite whichSprite = the number of cast  "Volume down lit"
  103.   puppetSprite cAudioLevel, TRUE
  104.   if gSoundlevel > 0 then
  105.     set gSoundlevel = gSoundlevel - 1
  106.   end if
  107.   set the castnum of sprite cAudioLevel = the number of cast ("sound level" && gSoundlevel)
  108.   puppetSprite whichSprite, FALSE
  109.   set the soundlevel = gSoundlevel
  110.   set the volume of sprite QTSprite = (gSoundlevel*32) + 32
  111.   updateStage
  112.   --  if the machineType <> 256 then puppetSound "click"
  113. end volumeLevelDown
  114.  
  115. on waitFor seconds
  116.   put the timer into now
  117.   repeat while the timer < now + (seconds * 60)
  118.     if the mouseDown then exit
  119.   end repeat
  120. end waitFor
  121.  
  122.  
  123. on timeoutProcedure
  124.   go to movie "Intro"
  125. end 
  126.  
  127. --=============================================--
  128. --      INTRO.DIR movie script handlers      --
  129. --=============================================--
  130.  
  131. -- called in Intro.DIR to take the user to the first spot in tools
  132. on mainButtonSelect whichFrame
  133.   go to frame whichFrame of movie "Tools"
  134. end mainButtonSelect
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. --=============================================--
  142. --      VISION movie script handlers      --
  143. --=============================================--
  144.  
  145. on visionSelect whichDirection
  146.   global gpressed
  147.   put the clickOn into whichSprite
  148.   puppetSprite whichSprite, TRUE
  149.   set caster = the name of cast(the castnum of sprite whichSprite) && "lit"
  150.   set the castnum of sprite whichSprite = the number of cast caster 
  151.   repeat with n = 2 to 3
  152.     if n <> whichSprite then puppetSprite n, FALSE
  153.   end repeat
  154.   puppetSound "click"
  155.   puppetTransition 3,128,0
  156.   updateStage
  157.   waitFor .1
  158.   puppetSprite whichSprite, FALSE
  159.   set gpressed = whichSprite
  160.   if whichDirection = #next then
  161.     go to next
  162.   else
  163.     if the frameLabel = EMPTY then
  164.       go to marker(-3)
  165.     else
  166.       go to marker(-2)
  167.     end if
  168.   end if
  169. end visionSelect
  170.  
  171.  
  172. --=============================================--
  173. --      GENERAL movie script handlers      --
  174. --=============================================--
  175.  
  176. on clearPuppets
  177.   repeat with x = 1 to 24
  178.     puppetSprite x, 0
  179.   end repeat
  180. end
  181.  
  182. on picSwitcher howMany
  183.   put the clickon into whichSprite
  184.   put the mouseCast into whichCast
  185.   puppetSprite whichSprite, 1
  186.   put (the name of cast whichCast) into myName
  187.   put word 1 of myName into whichPic
  188.   put integer(word 2 of myName) into whichNum
  189.   set whichNum = (whichNum + 1)
  190.   if whichNum = (howMany + 1) then set whichNum = 1
  191.   set the castNum of sprite whichSprite = the number of cast (whichPic && string(whichNum))
  192.   updateStage
  193. end
  194.  
  195. on checkDepth
  196.   repeat with x = 1 to 6000
  197.     if the casttype of cast x = # bitmap then
  198.       if the depth of cast x > 8 then put "Bad cast at cast number" && string(x)
  199.     end if
  200.   end repeat
  201.   beep 3
  202. end
  203.  
  204. -- Not used in this movie, but a handy-dandy way to find out where castmembers are in the score.
  205. on checkitout maxScoreFrame, whichCast
  206.   repeat with x = 1 to maxScoreFrame
  207.     go to frame x
  208.     repeat with y = 1 to 48
  209.       if the castnum of sprite y = whichCast then put "Cast" &&  string(whichCast) && "found in sprite"&& string(y)&&"at frame"&& string(x)     
  210.     end repeat
  211.   end repeat
  212. end
  213.  
  214. on bitdepther howmany
  215.   repeat with x = 1 to howmany
  216.     if the castType of cast x = #bitmap then
  217.       if the depth of cast x > 8 then put "Castmember"&& string(x)&& "has a color depth of"&& the depth of cast x 
  218.     end if
  219.   end repeat
  220. end